package socketmvc.core.packets.basic.impl;

import socketmvc.core.util.BytesUtils;
import socketmvc.core.packets.basic.JsonBasicPacket;
import socketmvc.core.packets.basic.Protocol;

public class JsonHexPacket extends JsonBasicPacket {

    public JsonHexPacket(JsonTextBody textBody, String hexBinBody){
        this.textBody = textBody;
        this.binBody = BytesUtils.hexStringToBytes(hexBinBody);
    }

    @Override
    public byte protocolVersion() {
        return Protocol.JSON_TEXT_HEX_CONTENT.getVersion();
    }

    @Override
    public String protocolName() {
        return Protocol.JSON_TEXT_HEX_CONTENT.getName();
    }

}
